package cn.flant.io.tools;

import java.io.IOException;
import java.io.PipedReader;
import java.io.PipedWriter;
import java.io.Reader;
import java.io.Writer;

public class CharPiped {

	private Reader reader = null;
	private Writer writer = null;

	private CharPiped() throws IOException {
		PipedReader reader = new PipedReader();
		PipedWriter writer = new PipedWriter(reader);
		this.writer = writer;
		this.reader = reader;
	}

	public static CharPiped open() throws IOException {
		return new CharPiped();
	}

	public Writer getWriter() {
		return writer;
	}

	public Reader getReader() {
		return reader;
	}
}
